{
语法百题 解题报告：
 http://git.oschina.net/et0662/sznoi-grammar/ 
}
var
	n,m:double;
begin
	m:=0;
	readln(n);
	if n<=3 then
		m:=10
	else if n<=5 then
		m:=10+(n-3)*1.8
	else
		m:=13.6+(n-5)*2.7;
	writeln(m:0:2);
end.
